home *** CD-ROM | disk | FTP | other *** search
Wrap
SHMEM_SWAP(3) SHMEM_SWAP(3) NNNNAAAAMMMMEEEE sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____iiiinnnntttt____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll4444____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll8888____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____sssswwwwaaaapppp - Performs an atomic swap to a remote data object SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS C or C++: ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>> ddddoooouuuubbbblllleeee sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____sssswwwwaaaapppp((((ddddoooouuuubbbblllleeee ****_t_a_r_g_e_t,,,, ddddoooouuuubbbblllleeee _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;; ffffllllooooaaaatttt sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____sssswwwwaaaapppp((((ffffllllooooaaaatttt ****_t_a_r_g_e_t,,,, ffffllllooooaaaatttt _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;; iiiinnnntttt sssshhhhmmmmeeeemmmm____iiiinnnntttt____sssswwwwaaaapppp((((iiiinnnntttt ****_t_a_r_g_e_t,,,, iiiinnnntttt _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;; lllloooonnnngggg sssshhhhmmmmeeeemmmm____lllloooonnnngggg____sssswwwwaaaapppp((((lllloooonnnngggg ****_t_a_r_g_e_t,,,, lllloooonnnngggg _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;; lllloooonnnngggg lllloooonnnngggg sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____sssswwwwaaaapppp((((lllloooonnnngggg lllloooonnnngggg ****_t_a_r_g_e_t,,,, lllloooonnnngggg lllloooonnnngggg _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;; lllloooonnnngggg sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp((((lllloooonnnngggg ****_t_a_r_g_e_t,,,, lllloooonnnngggg _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;; Fortran: IIIINNNNTTTTEEEEGGGGEEEERRRR _p_e IIIINNNNTTTTEEEEGGGGEEEERRRR SSSSHHHHMMMMEEEEMMMM____SSSSWWWWAAAAPPPP _i_r_e_s = SSSSHHHHMMMMEEEEMMMM____SSSSWWWWAAAAPPPP((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e)))) IIIINNNNTTTTEEEEGGGGEEEERRRR((((KKKKIIIINNNNDDDD====4444)))) SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____SSSSWWWWAAAAPPPP _i_r_e_s = SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____SSSSWWWWAAAAPPPP((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e)))) IIIINNNNTTTTEEEEGGGGEEEERRRR((((KKKKIIIINNNNDDDD====8888)))) SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____SSSSWWWWAAAAPPPP _i_r_e_s = SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____SSSSWWWWAAAAPPPP((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e)))) RRRREEEEAAAALLLL((((KKKKIIIINNNNDDDD====4444)))) SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL4444____SSSSWWWWAAAAPPPP _r_e_s = SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL4444____SSSSWWWWAAAAPPPP((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e)))) RRRREEEEAAAALLLL((((KKKKIIIINNNNDDDD====8888)))) SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL8888____SSSSWWWWAAAAPPPP _r_e_s = SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL8888____SSSSWWWWAAAAPPPP((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e)))) DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp performs an atomic swap operation. It writes value _v_a_l_u_e into _t_a_r_g_e_t on processing element (PE) _p_e and returns the previous contents of _t_a_r_g_e_t as an atomic operation. The arguments are as follows: _t_a_r_g_e_t The remotely accessible integer data object to be updated on the remote PE. If you are using C/C++, the type of _t_a_r_g_e_t should match that implied in the SYNOPSIS section. If you are using Fortran, it must be of the following type: RRRRoooouuuuttttiiiinnnneeee DDDDaaaattttaaaa TTTTyyyyppppeeee SSSSHHHHMMMMEEEEMMMM____SSSSWWWWAAAAPPPP Integer of default kind SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____SSSSWWWWAAAAPPPP 4-byte integer SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____SSSSWWWWAAAAPPPP 8-byte integer SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL4444____SSSSWWWWAAAAPPPP 4-byte real SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL8888____SSSSWWWWAAAAPPPP 8-byte real _v_a_l_u_e Value to be atomically written to the remote PE. _v_a_l_u_e is the same type as _t_a_r_g_e_t. _p_e An integer that indicates the PE number on which _t_a_r_g_e_t is to be updated. If you are using Fortran, it must be a default integer value. NNNNOOOOTTTTEEEESSSS The term _r_e_m_o_t_e_l_y _a_c_c_e_s_s_i_b_l_e is defined in iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3). sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp writes directly into another PE's memory without notifying that PE, so the receiving PE should normally set automatic cache invalidation by use of sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____iiiinnnnvvvv(3) or sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____lllliiiinnnneeee____iiiinnnnvvvv(3). If this is not done, the receiving PE's data cache might become incoherent. You can use sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp without setting the remote write invalidate bit if you know, prior to the call, that the data at the target addresses are not cachable or are otherwise known not to reside in the remote processor's cache at the time of the call. Alternatively, the receiving processor can flush its cache when it knows that it has received data from another processor. In general, this requires synchronization. The cache can be flushed using sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh(((()))) or sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh____lllliiiinnnneeee(((()))). RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS The contents that had been at the target address on the remote PE prior to the swap is returned. SSSSEEEEEEEE AAAALLLLSSSSOOOO iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmeeeemmmm____cccclllleeeeaaaarrrr____ccccaaaacccchhhheeee____iiiinnnnvvvv(3), sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____iiiinnnnvvvv(3), sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____lllliiiinnnneeee____iiiinnnnvvvv(3)